<Project Sdk="Microsoft.NET.Sdk">

  <PropertyGroup>
    <TargetFramework Condition="'$(WasmEnableThreads)' != 'true'">$(NetCoreAppCurrent)</TargetFramework>
    <TargetFrameworks Condition="'$(WasmEnableThreads)' == 'true'">$(NetCoreAppCurrent);$(NetCoreAppCurrent)-browser</TargetFrameworks>
    <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
    <UseCompilerGeneratedDocXmlFile>false</UseCompilerGeneratedDocXmlFile>
  </PropertyGroup>
  <PropertyGroup>
    <TargetPlatformIdentifier>$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)'))</TargetPlatformIdentifier>
    <FeatureWasmManagedThreads Condition="'$(TargetPlatformIdentifier)' == 'browser' and '$(WasmEnableThreads)' == 'true'">true</FeatureWasmManagedThreads>
    <DefineConstants Condition="'$(FeatureWasmManagedThreads)' == 'true'" >$(DefineConstants);FEATURE_WASM_MANAGED_THREADS</DefineConstants>
  </PropertyGroup>
  <ItemGroup>
    <Compile Include="System\Threading\Tasks\Parallel.cs" />
    <Compile Include="System\Threading\Tasks\Parallel.ForEachAsync.cs" />
    <Compile Include="System\Threading\Tasks\ParallelETWProvider.cs" />
    <Compile Include="System\Threading\Tasks\ParallelLoopState.cs" />
    <Compile Include="System\Threading\Tasks\ParallelRangeManager.cs" />
    <Compile Include="System\Threading\Tasks\TaskReplicator.cs" />
  </ItemGroup>

  <ItemGroup>
    <Reference Include="System.Collections" />
    <Reference Include="System.Collections.Concurrent" />
    <Reference Include="System.Diagnostics.Tracing" />
    <Reference Include="System.Runtime" />
    <Reference Include="System.Threading" />
    <Reference Include="System.Threading.ThreadPool" />
  </ItemGroup>

</Project>
